import Vue from 'vue'
//导路由的包
import VueRouter from 'vue-router'
//vue使用路由模块
Vue.use(VueRouter)


//引用搜索组件
import MySearch from '../views/MySearch.vue'
// 引用商品详情页
import MyGoods from '../views/MyGoods.vue'

//引用登录组件
import CloseView from '../views/CloseView.vue'
import Register from '../views/RegisterView.vue'
import Login from '../views/LoginView.vue'
import HomePage from '../views/HomePage.vue'
import ReleaseView from '../views/ReleaseView.vue'
import ComplaintView from '../views/ComplaintView.vue'
import WinView from '../views/WinView.vue'
import paying from '../views/PayIng'


//vue使用路由模块.
Vue.use(VueRouter)
import MyCenter from '../views/MyCenter.vue'
import OthersData from '../views/OthersData.vue'
import HuodongPage from '../views/HuodongPage.vue'
import ActivityPage from '../views/ActivityPage.vue'
import AuctionHomepage from '../views/AuctionHomepage.vue'//拍卖首页
import AuctionDetail from '../views/AuctionDetail.vue'
import UserChat from '../views/UserChat.vue'



//聊天
import CustomerChat from "../views/CustomerChat.vue";
//配置路由表
const routes=[
    
    //！！！默认路径（默认组件）
    //名字        路径           组件
    //名字        路径           搜索组件
    {name:'search',path:'/search',component:MySearch},
    {name:'goods',path:'/goods',component:MyGoods},
    {name:'CloseView',path:'/CloseView',component:CloseView},
    {name:'HomePage',path:'/',component:HomePage},
    {name:'ReleaseView',path:'/ReleaseView',component:ReleaseView},
    {name:'ComplaintView',path:'/ComplaintView',component:ComplaintView},
    {name:'MyCenter',path:'/MyCenter',component:MyCenter},
    {name:'OthersData',path:'/OthersData',component:OthersData},
    {name:'Register',path:'register',component:Register},
    {name:'Login',path:'/login',component:Login},
    {name:'HuodongPage',path:'/HuodongPage',component:HuodongPage},//活动营销活动报名中心
    {name:'ActivityPage',path:'/ActivityPage',component:ActivityPage},//活动页
    {name:'AuctionHomepage',path:'/AuctionHomepage',component:AuctionHomepage},//拍卖首页
    {name:'AuctionDetail',path:'/AuctionDetail',component:AuctionDetail}, //拍卖详情页
    {name:'WinView',path:'/WinView',component:WinView},//支付成功页面
    {name: 'CustomerChat',path: '/CustomerChat',component:CustomerChat},  //客服聊天
    {name: 'UserChat',path: '/UserChat/:id',component:UserChat},  //用户聊天
    {name: 'paying',path: '/paying',component:paying},//

]

//创建路由
const router =new VueRouter({
    // mode:'history',
    routes
})

//导出路由
export default router